Skip to content

Conversation

@ShoyuVanilla
Copy link
Member

@ShoyuVanilla ShoyuVanilla commented Nov 25, 2025

Fixes rust-lang/trait-system-refactor-initiative#257

Seems that considering super outlives bounds only on self type is enough for preventing unsoundnesses like in #98117

r? lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 25, 2025
@lcnr
Copy link
Contributor

lcnr commented Nov 27, 2025

So I think this one is fine after thinking about it for a bit, even if I am still somewhat uncomfortable with this change.

Regardless of whether this is sound, it does not work once we want to support coinductive traits as we will need to check all super trait bounds at this point.

I generally think that the underlying issue of the search graph perf hack in rust-lang/trait-system-refactor-initiative#257 (comment) will also affect other code snippets

I would like to remove that perf hack and look into other optimizations and fast paths which don't negatively impact behavior

@lcnr lcnr added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2025
@ShoyuVanilla
Copy link
Member Author

Okay, in any case, this doesn't seem to be a preferable fix, especially regarding coinductive traits. I'll close this and look for otherwise like that perf hack

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

global where-bounds normalization issue

3 participants